#include "mbCommon.h"

void print_recv_Data(uint16_t (&array)[MSGLEN],bool bAll)
{
    if(bAll){
        for(int i = 0; i < MSGLEN; i++)
            cout<<"recv [Address] : "<<i+READADDRESS<<" , [value] : "<<array[i]<<endl;
    }else{
        for(int i = 0; i < MSGLEN; i++){
            if(array[i] != 0)
                cout<<"recv [Address] : "<<i+READADDRESS<<" , [value] : "<<array[i]<<endl;
        }
    }
}

void print_send_Data(uint16_t (&array)[MSGLEN],bool bAll)
{
    if(bAll){
        for(int i = 0; i < MSGLEN; i++)
            cout<<"send [Address] : "<<i+WRITEADDRESS<<" , [value] : "<<array[i]<<endl;
    }else{
        for(int i = 0; i < MSGLEN; i++){
            if(array[i] != 0)
                cout<<"send [Address] : "<<i+WRITEADDRESS<<" , [value] : "<<array[i]<<endl;
        }
    }
}
